<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="shortcut icon" href="/static/img/logo/favicon.ico" />
  <link rel="stylesheet" href="/static/assets/plugins/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="/static/css/footer.css">
  <link rel="stylesheet" href="/static/css/header.css">
  <title>文件共享</title>

</head>

<body>
  {% include 'header.html' %}
  <div class="container">
    <div class=" row p-5">
      {% for post in posts %}
      {% if post.allow %}
      <div class="col-3 shadow row m-5 p-0">
        <div class="col-10">
          <p><span class="fs-4">{{ post.author.username }}</span><span class="fs-6 fw-lighter">:{{ post.file.url | slice:"13:" }}</span></p>
          <p class="fw-bolder">{{ post.title }}</p>
        </div>

        <div class="col-2 float-end p-0 m-0">
          <a download href="{{ post.file.url }}">
            <button  class="btn btn-outline-secondary w-100 h-100 "><svg xmlns="http://www.w3.org/2000/svg"
                width="26" height="26" fill="currentColor" class="bi bi-arrow-down-circle" viewBox="0 0 16 16">
                <path fill-rule="evenodd"
                  d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z" />
              </svg></button>
          </a>
        </div>
      </div>
      {% endif %}
      {% endfor %}
    </div>
  </div>
  {% include 'footer.html' %}
  <script src="/static/assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>

</html>